<!doctype html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/_mozilla/bluetooth/bluetooth-helpers.js"></script>
<script>
'use strict';
promise_test(t => {
    window.testRunner.setBluetoothMockDataSet(adapter_type.two_heart_rate);
    return window.navigator.bluetooth.requestDevice({acceptAllDevices: true})
    .then(device => device.gatt.connect())
    .then(gattServer => promise_rejects_dom(t, 'NotFoundError', gattServer.getPrimaryServices()));
}, 'requestDevice called with acceptAllDevices: true and with no optionalServices. Should not get access to any services.');
</script>
